package com.itheima.user.clients.fallback;

import com.itheima.common.vo.OrderVO;
import com.itheima.user.clients.OrderClient;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class OrderClientFallback implements OrderClient {

    @Override
    public List<OrderVO> findOrderByUsername(String username) {
        ArrayList<OrderVO> orderVOS = new ArrayList<>();

        OrderVO orderVO = new OrderVO();
        orderVO.setId("-1");
        orderVO.setUsername("order服务调用异常");
        orderVOS.add(orderVO);

        return orderVOS;
    }
}
